package com.eliza.demo.vm

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.eliza.library.model.User


/*-*- coding:utf-8 -*-
 * @Author  : debi
 * @Time    : 4/18/22
 * @Software: Android Studio
 */
class UserVm : ViewModel() {
    var userData: MutableLiveData<User> = MutableLiveData<User>().apply {
        value = User("", 0)
    }


    fun setUser(user: User) {
        userData.value = user
    }

    fun getUser(): User {
        return userData.value!!

    }


}